package com.onstar.cn.weight.anim;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.drawable.Drawable;
import android.text.style.DynamicDrawableSpan;
import android.text.style.ReplacementSpan;

import com.onstar.cn.weight.R;

/**
 * Created by 7828wc on 2016/5/12.
 * 主要处理文字或图片跳跃距离，让每一个文字或图片都可以独立操作
 */
public class JumpImageSpan extends DynamicDrawableSpan {
    private Context context;

    public JumpImageSpan(Context context) {
        this.context = context;
    }

    @Override
    public Drawable getDrawable() {
        Drawable d = context.getResources().getDrawable(R.drawable.ic_launcher);
        d.setBounds(0, 0, 50, 50);
        return d;
    }
}
